import { Ref, ref, WatchStopHandle } from "vue";
import ObjectControllerCode from "./ObjectControllerCode";

/**
 * 状态数据
 */
export default class statComponen {
    private static instance: statComponen = new statComponen();
    /**
     * 状态数据
     */
    public static get Default(): statComponen {
        return this.instance;
    }

    constructor() {
        window.addEventListener('unload', this.Dispose.bind(this));
    }

    Dispose() {
        window.removeEventListener('unload', this.Dispose);
    }
    public StatusConfigs: Ref<any> = ref(new Map([
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_START, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_PARKING, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_Gears, 'P'],

        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_LOCK_CAR_WINDOW, 'Activated'],

        //舱盖锁
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_HOOD_SWITCH, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_TRUNK_SWITCH, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_LOCK_CAR_DOOR, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_UNLOCK_CAR_DOOR, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.TRUNK_CLOSE_SWITCH, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.TRUNK_MACHINERY_SWITCH, 'Activated'],

        //后视镜
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_REARVIEW_MIRROR_FOLD, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_REARVIEW_MIRROR_HEATER, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_REARVIEW_MIRROR_ACTIVATE_LEFT, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_REARVIEW_MIRROR_ACTIVATE_OFF, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_REARVIEW_MIRROR_ACTIVATE_RIGHT, 'Activated'],
        //灯光开关
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_LIGHT_TURN_LEFT, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_LIGHT_TURN_RIGHT, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_LIGHT_HEAD_NEAR, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_LIGHT_HEAD_DISTANCE, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_LIGHT_HEAD_FLASH, 'Activated'],

        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_LIGHT_AUTO, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_LIGHT_OFF, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_LIGHT_LAMPLET_SWITCH, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_LIGHT_HEADLAMP_SWITCH, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_LIGHT_FRONT_FOG, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_LIGHT_REAR_FOG, 'Activated'],
        //雨刮开关
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_WIPER_FRONT_ONCE, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_WIPER_FRONT_CLSOE, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_WIPER_FRONT_SPRAY, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_WIPER_FRONT_INTERVAL, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_WIPER_FRONT_LOW, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.APPEARENCE_UI_WIPER_FRONT_HIGHT, 'Activated'],
        //遥控器
        [ObjectControllerCode.Default.MsgCodesList.REMOTEKEY_TRUNKLID_UNLOCK, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.REMOTEKEY_LOCK, 'Activated'],
        [ObjectControllerCode.Default.MsgCodesList.REMOTEKEY_UNLOCK, 'Activated'],
    ]));

}